<?php

class Taxi_Model_Taxistes extends Zend_Db_Table_Abstract
{
    protected $_name = 'taxistes';
    protected $_primary = 'mail';
    
    public function login($mail, $password)
    {

        $where = $this->_db->select()
                    ->from($this->_name)
                    ->where('mail = ?', $mail)
                    ->where('pass = ?', $password);
        
        $result = $where->query()->fetchAll();
        
        if (sizeof($result)== 0)
        {
            return -1;
        }else
        {
            return 0;
        }
    }

}

